-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
initial implementation of naive_encoding_circuit #184
Conversation
… cleanup, and calculation of B' (that part wasn't necessary for all codes currently available in the library (they all have r2=0))
Codecov Report
@@ Coverage Diff @@
## master #184 +/- ##
==========================================
- Coverage 83.42% 79.27% -4.16%
==========================================
Files 45 48 +3
Lines 3415 3594 +179
==========================================
Hits 2849 2849
- Misses 566 745 +179
... and 5 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Speaking of there not being a built in code that has the property needed to fully test the canonicalization in the 1997 Cleve and Gottesman paper, should we open an issue to combine all the src/ecc/[insert_name]code.jl files into one big src/ecc/codezoo.jl file? |
I think I would prefer to keep the various codes in separate files that get Currently I have a couple of vague worries about the approach taken (but I can be convinced otherwise):
I will try to provide a more detailed review later in the week. A few minor things:
|
I agree this could be done on tableaux for a reduced cost, but was thinking that would be more of a finishing touch, after I'm confident my implementation is working correctly. The matrices in the paper are the transpose of how we store tableaux, and so to make following the method in the paper less error prone, I implemented it the way I did. My initial approach was to follow the paper, producing all intermediary calculations, |
Just realized that I made a mistake - so of course the logical X measurement isn't working - the encoding circuit is correct for Cleve8, but incorrect for Steane7 and likely Shor9 as well. Cleve8 had I'll try to get a commit with the proper B' submitted sometime today, and at that time I'll let you know if logical X measurement still isn't working. |
…ed the B' part, and fixed the rank calculations
Benchmark ResultJudge resultBenchmark Report for /home/runner/work/QuantumClifford.jl/QuantumClifford.jlJob Properties
ResultsA ratio greater than
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfoTarget
Baseline
Target resultBenchmark Report for /home/runner/work/QuantumClifford.jl/QuantumClifford.jlJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Baseline resultBenchmark Report for /home/runner/work/QuantumClifford.jl/QuantumClifford.jlJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Runtime information
Architecture: x86_64
|
finished in #154 |
Everything seems to be working for the encoding circuits I'm generating except for the logical X pauli frame measurement. My hunch is that it has to do with preparing the initial state in the X basis, but my reasoning leads me to think that there should be Hadamard gates on the first k qubits, where k is the number of qubits to be encoded. The current implementation of the logical X measurement applies a Hadamard to gate 1, which for Shor9 and Steane7 is correct (for them, k=1). Is my understanding correct? Do you have some other idea what might be the problem?
Anyway here are the good results:
Logical vs Physical error plots, generated using Cleve97 style encoding circuits, as well as the reindexing stabilizer tableau:
Encoding circuit generated for Steane7:
Encoding circuit generated for Shor9:
Encoding circuit generated for Cleve8 (the circuit in the paper)
My$X*$ and $Z*$ ended up a little different from the paper, but I believe that it was simply due to some differences in the exact Gaussian elimination operations performed. Here are my matrices:
Tomorrow I will work on cleaning things up, doing more testing, hopefully figuring out the logical X measurement, and also implementing code for$B'$ part of the paper. Steane7, Shor9, and Cleve8 all have $r_2=0$ , so $X^{(1)}==X^{(2)}$ and $Z^{(1)}==Z^{(2)}$ . For that reason, I left that as a TODO, since I need to find or come up with a code which has a nonzero value for $r_2$ so that I can properly test and troubleshoot.